//#ifndef SEGMENT_PAIR_LIBRARY_
//#define SEGMENT_PAIR_LIBRARY_

//// Copyright 2013, Egor Dolzhenko
////
//// This file is part of rearrangement-toolkit.
////
//// Rearrangement-toolkit is free software: you can redistribute it and/or modify
//// it under the terms of the GNU General Public License as published by
//// the Free Software Foundation, either version 3 of the License, or
//// (at your option) any later version.

//// Rearrangement-toolkit is distributed in the hope that it will be useful,
//// but WITHOUT ANY WARRANTY; without even the implied warranty of
//// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//// GNU General Public License for more details.
////
//// You should have received a copy of the GNU General Public License
//// along with Rearrangement-toolkit.  If not, see <http://www.gnu.org/licenses/>.

//// Contents:
//// (1) a type Strings which is a vetor of strings,
//// (2) a type Segments which is a vector of segments,
//// (3) a struct SegmentPair containing info about a pair of similar segments,
//// (4) a class SegmentPairLibrary which is used to process BLAST output from a
////     file on a disk.

//#include <vector>
//#include <fstream>

//using namespace std;

//typedef vector<string> Strings;

//// holds information about a pair of mic and mac segments sharing a high degree
//// of similarity
//struct SegmentPair {
//  // sequence id of micronuclear precursor
//  string precursor_name;
//  // sequence id if macronuclear product
//  string product_name;
//  // total length of the alignment
//  int length;
//  // location of the mac segment on the mac sequence, mac_start < mac_end
//  int product_start;
//  int product_end;
//  // location of the mic segment on the mic sequence, mic_start < mic_end
//  int precursor_start;
//  int precursor_end;
//  // orientation of the segments relative to each other; false for segments
//  // with same orientation
//  bool is_reversed;
//};

//// Processes a file with segment pairs. Sample usage:
//// (1) to process a file foo.blast with blast results (in the tab format) use
////     SegmentPairLibrary segmentPairLibrary("foo.blast");
//// (2) to read in the next batch of segment pairs corresponding to same mic/mac
////     use segmentPairLibrary.next();
//// (3) the current batch of segment pairs is stored in current_segment_pairs_
//class SegmentPairLibrary {
//  public:
//    typedef vector<SegmentPair> SegmentPairs;
//    SegmentPairLibrary(string filename);
//    bool next(); //returns true and updates all of the fields; returns false if at EOF
//    SegmentPairs const& get_segment_pairs() { return segment_pairs_; }
//    string get_cur_precursor_name() { return cur_precursor_name_; }
//    string get_cur_product_name() { return cur_product_name_; }
//  private:
//    string cur_precursor_name_;
//    string cur_product_name_;
//    SegmentPairs segment_pairs_;
//    ifstream blast_file_;
//    SegmentPair current_segment_pair_;
//    bool parseNextSegmentPair();
//    Strings tabSplit(string line);
//};
//#endif //SEGMENT_PAIR_LIBRARY_
